<title>忘记密碼</title>
<style>


</style>
<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>管理员配置</cite></a>
        <a><cite>修改密碼</cite></a>
    </div>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-form" id="layuiadmin-form-userinfo"
                     lay-filter="layuiadmin-form-password">
                    <div class="layui-form-item">
                        <label class="layui-form-label">原密码</label>
                        <div class="layui-input-block">
                            <input class="layui-input" name="oldPassword" autocomplete="off" lay-verify="required"
                                   type="password">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">新密码</label>
                        <div class="layui-input-block">
                            <input class="layui-input" name="newPassword" id="newPassword" autocomplete="off"
                                   lay-verify="required|loginPass" type="password">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">确认新密码</label>
                        <div class="layui-input-block">
                            <input class="layui-input" autocomplete="off" id="reNewPassword"
                                   lay-verify="required|loginRepass" type="password">
                        </div>
                    </div>

                    <input class="layui-input" name="loginID" id="loginID" value="" type="hidden">

                    <script type="text/html" template lay-url="/api/admin/request/token/generate"
                            lay-data="{pageId: 'APWD10'}" lay-type="post" lay-done="doUpdateToken(d);">
                        <input type="hidden" name="requestId" id="subToken" value="{{d.token}}">
                    </script>
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-block">
                            <input class="layui-btn submit" id="submit"
                                   lay-filter="submit-user-password" lay-submit
                                   style="float: right" type="button" value="确认">
                        </div>
                    </div>
                </div>

            </div>
        </div>


    </div>
</div>


<script>

    layui.use('user', layui.factory('user')).use(['admin', 'form', 'user'], function () {
        var $ = layui.jquery
            , form = layui.form
            , element = layui.element;
        $('#loginID').val(getParam())
        element.render();
        form.render();
    })


    doUpdateToken = function (d) {

    }

    function getParam() {
        var setter = layui.setter
        var loginID = layui.data(setter.tableName)[setter.request.loginIdKey];
        return loginID;
    }
</script>
